package com.jeesite.modules.dataScreen.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jeesite.modules.dataScreen.dao.UnefforderDao;
import com.jeesite.modules.dataScreen.entity.Unefforder;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author machenzhi
 * @date 2024/07/02 17:13
 */
@Service
public class UnefforderService extends ServiceImpl<UnefforderDao, Unefforder> {

    public List<Unefforder> listByType(Integer type){
        LambdaQueryWrapper<Unefforder> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(Unefforder::getOrderst, type);
        return this.list(queryWrapper);
    }

    public Unefforder getOrderById(String workorderid) {
        LambdaQueryWrapper<Unefforder> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(Unefforder::getWorkorderid, workorderid);
        return this.getOne(queryWrapper);
    }
}
